<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>INA Admin V{$INA.version}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="{$INA.adminTemplate}login.css" rel="stylesheet" type="text/css" />
</head>

<body>
{* loads language file *}
{config_load file=$INA.lang section=loginForm}

{* md5 transformation *}
<script type="text/javascript" src="{$INA.adminTemplate}javascript/md5.js"></script>
{literal}
<script type="text/javascript" language="JavaScript">
	function scrambleUserPass(pleaseWait){
		document.getElementById('userpass').value = MD5(document.getElementById('tpass').value);
		document.getElementById('tpass').value = null;

		document.getElementById('submit').disabled = true;
		document.getElementById('submit').value = pleaseWait;
	}
</script>
{/literal}

<div class="shadow">
	<div id="wrap">
		<div id="border1">
			<div id="outb">
				
                <div id="loginForm">
                	{* check if the current IP or User is blocked *}
                	{if !$blocked and !$userBlockError}
                		<h4>{#formTitle#}</h4>
                		<form action="{$INA.admin}" method="post" id="login" onSubmit="scrambleUserPass('{#pleaseWait#}');">
                			<table id="loginTable" align="center" width="330">
                				<tr><td class="fieldName"><label for="username"><nobr>{#userName#}</nobr></label></td><td>
                					<input type="text" name="username" value="{$smarty.post.username}" maxlength="64" id="username" class="textField" tabindex="1" />
                				</td></tr>
                				<tr><td class="fieldName"><label for="tpass"><nobr>{#userPass#}</nobr></label></td><td>
                					<input type="password" name="tpass" value="" maxlength="64" id="tpass" class="textField" tabindex="2" />
                				</td></tr>
                				<tr><td class="fieldName">
                					<input type="checkbox" name="remember" id="userremm" value="1" class="checkField" tabindex="4" {if $smarty.post.remember}checked{/if} />
                				</td><td><label for="userremm">{#userRemm#}</label></td></tr>
                
                				{* problems with authentication *}
                				{if $loginError}
                					<tr><td colspan="2" class="fieldError">
                						<p>{#loginError#}</p>
                					</td></tr>
                				{/if}
                
                				<tr><td colspan="2" class="fieldButton">
                					<input type="submit" name="submit" value="{#submit#}" id="submit" tabindex="3" />
                					<input type="hidden" name="userpass" value="" id="userpass" />
                				</td></tr>
                
                				<!-- <tr><td colspan="2" class="fieldButton"><p>{#forgotPass#}</p></td></tr> -->
                			</table>
                		</form>
                	{else}
                		{if $userBlockError}
                			<p>{#userBlock#}</p><p><strong>{$userBlockExpires|date_format:"%d/%m/%Y %H:%M"}</strong></p>
                		{else}
                			<p>{#ipblocked#}</p>
                			<p>{#ipblocked2#} <strong>{$blockExpires|date_format:"%d/%m/%Y %H:%M"}</strong></p>
                			<p>{#currentTime#} <strong>{$smarty.now|date_format:"%d/%m/%Y %H:%M"}</strong></p>
                		{/if}
                	{/if}
                </div>

            </div>
        </div>
    </div>
</div>
<div class="smallNote">Powered by INA version {$INA.version}</div>
</body>
</html>